home *** CD-ROM | disk | FTP | other *** search
Text File | 1991-03-06 | 956 b | 31 lines | [TEXT/GEOL] |
- Item 6245283 7-Dec-89 02:48
-
- From: D5295 Reseach SW Design, D Goldman,PRT
-
- To: MACAPP.TECH$ MacApp Technical
-
- Sub: Escaping nested Dialogs
-
- A small bug in TDialogView.DoKeyCommand:
-
- If the Escape key is pressed, and if there is no dismisser item in the dialog,
- there may yet be a superview interested in the Escape. (In my case, the dialog
- is inside a scroller inside a ...<a few views here>... inside another dialog.)
-
- The fix is easy:
-
- chEscape:
- IF aKeyCode = kClearVirtualCode THEN
- DoKeyCommand := INHERITED DoKeyCommand(ch, aKeyCode, info)
- ELSE IF LONGINT(fCancelItem) <> LONGINT(kNoIdentifier) THEN
- DoChoice(FindSubView(fCancelItem), mCancelKey)
-
- { this clause was forgotten in MacApp: }
- else if fNextHandler <> NIL then
- DoKeyCommand := fNextHandler.DoKeyCommand(ch, aKeyCode, info);
-
- Did I do that correctly?
-
- -- Dave Goldman
-
-